This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
A: Using existing Java Code:
1. create new script library, type = Java and give it a name.
2. Add your jar-files by "Import" - "Java Source"
3. Write your main class with functions
4. Save your script library
B: Lotusscript Agent
1. Create a new Agent, type = lotusscript and give it a name.
2. Under (Options) add:
Uselsx "*javacon"
Use "NameOfyourScriptLibrary"
3. Create your own lotusscript class, for example
Class MyClass
js As JAVASESSION
imgClass As JAVACLASS
imgObject As JavaObject
Sub New()
Set js=New JAVASESSION
Set imgClass=js.GetClass("JavaClassNameGivenInA1")
Set imgObject = imgClass.CreateObject
End Sub
Function yourFunctionName(Byval para1 As String, para2 As String, para3 As String)
Dim smsReturn As String
yourFunctionName = imgObject.FunctionWrittenInA3(para1,para2,para3)
End Function
End Class
4. Under initialize:
Declare your variable and call your written lotusscript class which calls your javaclass, for example
Dim s As New NotesSession
Dim db As NotesDatabase
Dim vw As NotesView
Dim doc As NotesDocument
Dim myName as MyClassGivenInB3
Set myName = New MyClassGivenInB3()
Set db = s.CurrentDatabase
Set vw = db.GetView("yourViewName")
Set doc = vw.getFirstDocument()
While Not ( doc Is Nothing )
Call MyClassGivenInB3.yourFunctionName(para1, para2, para3)
Dim smsReturn As String
Set doc = vw.getNextDocument( doc )
Wend
Feedback response number WEBB8E3CSN created by ~Justin Xanveluplopikle on 02/14/2011